<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTeamTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('team', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('company_id')->comment('公司ID');
            $table->integer('user_id')->comment('创建人ID');
            $table->integer('team_id')->comment('群ID');
            $table->tinyInteger('status')->default('1')->comment('是否删除（1正常，0删除）');
            $table->tinyInteger('type')->default('2')->comment('创建类型(2系统创建，1手动创建)');
            $table->integer('resume_id')->comment('群ID');
            $table->integer('created_at')->comment('创建时间');
            $table->integer('updated_at')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `team` comment '群组表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('team');
    }
}
